With the doubling of Internet traffic every three months and the tripling of Internet hosts every two years, routers continuously need to increase packet forwarding rates while still allowing for quick adaptation to routing changes. Internet routers classify incoming packets into a set of packets that are to be treated similarly for routing purposes (also known as “flows”) utilizing information contained in packet headers and a table of rules. This table is called the “rule table” or “router table.” The packet-header information that is used to perform the classification is some subset of the source and destination addresses, the source and destination ports, the protocol, protocol flags, type of service, and so on. The specific header information used for packet classification is governed by the rules in the rule table.
Each rule-table consists of at least one tuple, which is a pair of the form (F,N), where F is a filter and N is the next action (i.e., hop) for the packet. Typically, each filter is a destination address prefix and longest-prefix matching is used to determine the next hop for each incoming packet. That is, when a packet arrives at a router, its next hop is determined by the rule that has the longest prefix (i.e., filter) that matches the destination address of the packet. Generally, the length of a router-table prefix cannot exceed the length W of a destination address. In IPv4, destination addresses are W=32 bits long, and in IPv6, W=128.
In a static rule table, the rule set does not vary in time. For these tables, problems are often associated with the time required to search the rule table for the rule to use; the preprocessing time needed to create the rule-table data structure; and the amount of memory required by the rule-table data structure. In practice, rule tables are seldom truly static. At best, rules are rarely added to or deleted from the rule table because the rule-table data structure has to be reconstructed whenever a rule is added or deleted.
In contrast, in a dynamic rule table, rules are added/deleted with some frequency. For such tables, inserts/deletes are not batched. Rather, they are performed in real time. For such tables, the time required to insert/delete a rule is a concern. For a dynamic rule table, the initial rule-table data structure is constructed by starting with empty data structures and then inserting the initial set of rules into the data structure one by one. Consequently, in the case of dynamic tables, the preprocessing time is very closely related to the insert time.
Several trie-based data structures for prefix-router tables have been proposed (Sklower, K., “A tree-based routing table for Berkeley Unix,” Technical Report, University of California, Berkeley (1993); Degermark, M. et al., “Small forwarding tables for fast routing lookups,” ACM SIGCOMM, 3-14(1997); Doeringer, W. et al., “Routing on longest-matching prefixes,” IEEE/ACM Transactions on Networking, 4, 1:86-97 (1996); Nilsson, S. and G. Karlsson, “Fast address look-up for Internet routers,” IEEE Broadband Communications (1998); Srinivasan, V. and G. Varghese, “Faster IP lookups using controlled prefix expansion,” ACM Transactions on Computer Systems, 1-40(1999); Sahni, S. and Kim, K. “Efficient construction of fixed-stride multibit tries for IP lookup,” Proceedings 8th IEEE Workshop on Future Trends of Distributed Computing Systems (2001); Sahni, S. and Kim, K. “Efficient construction of variable-stride multibit tries for IP lookup,” Proceedings IEEE Symposium on Applications and the Internet (SAINT), 220-227 (2002)). Some of the proposed structures perform dynamic router-table operations (lookup, insert; delete) in O(W) time. Others attempt to optimize lookup time and memory requirement through an expensive preprocessing step. These structures, while providing very fast lookup capability, have a prohibitive insert/delete time and so, they are suitable only for static router-tables (i.e., tables into/from which no inserts and deletes take place).
Another proposed scheme performs a binary search on hash tables organized by prefix length (Waldvogel, M., “Scalable high speed IP routing lookups,” ACM SIGCOMM, 25-36 (1997)). This binary-search scheme has an expected complexity of O(log W) for lookup. An alternative adaptation of binary search to longest-prefix matching uses a multi-way and multicolumn search (Lampson, B., et al., “IP lookup using multi-way and multicolumn search,” IEEE INFOCOM (1998)). Using this adaptation, a lookup in a table that has n prefixes takes O(W+log n)=O(W) time. Because both schemes also use expensive precomputation, they are not suited for dynamic router-tables.
A B-tree data structure for dynamic router tables has been proposed (Suri, S. et al., “Multiway range trees: Scalable IP lookup with fast updates,” GLOBECOM (2001). Using the B-tree data structure, the longest matching-prefix, lmp(d), can be found in O(log n) time. However, inserts/deletes take O(W long n) time. When W bits fit in O(1) words (as is the case for IPv4 and IPv6 prefixes) logical operations on W-bit vectors can be done in O(1) time each. In this case, the scheme takes O(log W log n) time for an insert and O(W+long n)=O(W) time for a delete. The number of cache misses that occur when the data structure is used is O(log n) per operation.
Data structures have been developed called a collection of red-black trees (CRBT) and alternate collection of red-black trees (ACRBT) which support the three operations of a dynamic router-table (longest matching-prefix, prefix insert, and prefix delete) in O(log n) time each. (Sahni, S. and K. Kim, “O(log n) dynamic packet routing,” IEEE Symposium on Computers and Communications (2002)). The number of cache misses in each structure is also O(log n). Like the original biased-skip list structure of Ergun, F. et al. (“A dynamic lookup scheme for bursty access patterns,” IEEE INFOCOM (2001)), CRBT and ACRBT adapt so as to perform lookups faster for bursty access patterns than for non-bursty patterns. The ACRBT structure may also be adapted to obtain a collection of splay trees structure, which performs the three dynamic router-table operations in O(log n) amortized time and which adapts to provide faster lookups for bursty traffic.
Priority search trees have also been used to arrive at an O(log n) data structure for dynamic prefix-tables. This structure is faster than the CRBT structure described above. A data structure that employs priority search trees and red-black trees for the representation of rule tables in which the filters are a conflict-free set of ranges has also been proposed. This data structure permits most-specific-range matching as well as range insertion and deletion to be done in O(log n) time each.
Data structures BOB (binary tree on binary tree) have also been developed for dynamic router-tables in which the rule filters are non-intersecting ranges and in which the ties are broken by selecting the highest-priority rule that matches a destination address. Using BOB, the highest-priority rule that matches a destination address may be found in O(log2 n) time; a new rule may be inserted and an old one deleted in O(log n) time. Related structures PBOB (prefix BOB) and LMPBOB (longest matching-prefix BOB) have been proposed for highest-priority prefix matching and longest-matching prefixes. These structures apply when all filters are prefixes. The data structure LMPBOB permits longest-prefix matching in O(W) time; rule insertion and deletion take O(log n) time each. On practical rule tables, BOB and PBOB perform each of the three dynamic-table operations in O(log n) time and with O(log n) cache misses. The number of cache misses incurred by LMPBOB is also O(log n).
In addition to prefix routing, range routing can also be used. In a range router-table, each rule is a range of destination addresses. Several criteria have been proposed to select the best rule that matches a given destination address—first matching-rule in table, highest-priority rule that matches the address, and so on. For example, two data structures have been developed for dynamic range-router-tables—heap on TRIE (HOT) and binary search tree on TRIE (BOT) (see Gupta and McKeown, “Dynamic algorithms with worst-case performance for packet classification,” IFIP Networking (2000)). Both of these data structures are for cases when the best-matching rule is the highest-priority rule that matches the given destination address. The HOT takes O(W) time for a lookup and O(W log n) time for an insert or delete. The BOT structure takes O(W log n) time for a lookup and O(W) time for an insert/delete. However it would be desirable to reduce these times as much as possible to efficiently route packets.
Hardware solutions that involve the use of content addressable memory as well as solutions that involve modifications to the Internet Protocol (i.e., the addition of information to each packet) have also been proposed to increase the efficiency of routing packets. Unfortunately, hardware solutions are expensive and are difficult to individualize to specific needs.
In addition to the above mentioned papers, a number of U.S. Patents and published applications address dynamic routing schemes including, but not limited to U.S. Pat. Nos. 6,341,130; 6,335,932; 6,289,013; 6,212,184; 6,157,955; 6,092,072; 6,061,712; 6,041,053; 6,021,131; 6,018,524; 5,909,440; 5,787,430; 5,701,467; 5,555,405; 4,833,468; 4,251,861; and published patent application number 2002/0009076. Unfortunately, these references do not disclose schemes that adequately reduce the time in routing packets.
Accordingly, there is a need in the art for a routing structure to provide more effective ways to classify and route data packets. Specifically, prefix and interval partitioning schemes are needed to provide rapid and more memory efficient methods to search, insert and delete items in known dynamic router data tables.